/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 基于委托书查询
export const queryBySvcOrder = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/member/getRepairInfo/getInfoOrder`, { params });

/**
 *不基于委托书查询
 * @param params
 * @returns {*}
 */
export const NoListApi = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryNoBySvcOrder`, params);

/**
 *基于委托书查询还入主页列表
 * @param params
 * @returns {*}
 */
export const ReturnListApi = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryWaitIn`, { params });

/**
 *基于委托书点击还入查询对应工具还入情况
 * @param params
 * @returns {*}
 */
export const ReturnSearchList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryInOrder`, { params });

/**
 *基于委托书选择工具
 * @param params
 * @returns {*}
 */
export const ReturnChoose = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryTools`, { params });

/**
 *提取预估工具
 * @param params
 * @returns {*}
 */
export const EPTools = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryEPToolsBySvcOrderVO`, { params });

/**
 *点击委托书查询对应工具借还情况
 * @param params
 * @returns {*}
 */
export const BookSearchListApi = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryToolsBySvcOrder`, { params });

/**
 *基于委托书查询借出超期
 * @param params
 * @returns {*}
 */
export const SearchOverTime = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryOverTime`, { params });

/**
 *查询借用人
 * @param params
 * @returns {*}
 */
export const SearchPerson = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryBorrowPerson`, { params });

/**
 *处理库存
 * @param params
 * @returns {*}
 */
export const DoneTool = params => axios.put(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/dealStock`, { params });

/**
 *保存明细
 * @param params
 * @returns {*}
 */
export const SaveTool = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/save`, params);

/**
 *借出出库处理库存
 * @param params
 * @returns {*}
 */
export const handelStoreOJC = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/handelStoreOJC`, params);

/**
 * 还入入库保存明细
 * @param params
 * @returns {*}
 */
export const storeDetailTJC = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/storeDetailTJC`, params);

/**
 * 还入入处理库存
 * @param params
 * @returns {*}
 */
export const returnDealStock = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/returnDealStock`, params);

/**
 * 转借操作处理库存
 * @param params
 * @returns {*}
 */
export const toLendOption = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/toLendOption`, params);

/**
 *删除工具
 * @param params
 * @returns {*}
 */
export const DeleteTool = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/deleteTool`, params);

/**
 *提取预估工具
 * @param params
 * @returns {*}
 */
export const discountItem = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/discountItem`, { params });

/**
 *获取还入单打印信息
 * @param params
 * @returns {*}
 */
export const printReturnInfo = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/printReturnInfo`, params);


/**
 * 预估工具保存明细方法
 * @param params
 * @returns {*}
 */
export const preToolSave = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/preToolSave`, params);


/**
 * 打印借出出库单
 * @param params
 * @returns {*}
 */
export const printBorrowInfo = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/printBorrowInfo`, params);
